<template>
  <div>
    <popular :popular="popular"></popular>
    <reying :reyinglist="reyinglist"></reying>
  </div>
</template>

<script>
import axios from "axios";
import popular from '@/components/hot/popular';
import reying from '../../components/hot/reying';


export default {
  name: "hot",
  data: function () {
    return {
      reyinglist: [],
      popular: ""
    };
  },
  components: {
    popular,
    reying
  },
  mounted () {
    axios
      .get(
        "/ajax/movieOnInfoList?token=&optimus_uuid=9301B8F0D8A111EBB376757321755EB7A2F821BBA2B047FE86EE9833C24FC202&optimus_risk_level=71&optimus_code=10"
      )
      .then((res) => {
        console.log(res);
        this.reyinglist = res.data.movieList;
        this.reyinglist.forEach(item => {
          item.img = item.img.replace("w.h", "64.90");
        })
      });

    axios.get('/ajax/topRatedMovies?token=&optimus_uuid=A1411130C83511EBB4C89D9CE0590754D99726EE43F74ACFAB86D17B35714FDA&optimus_risk_level=71&optimus_code=10').then((res) => {
      console.log(res);
      this.popular = res.data
    })
  },
};
</script>

<style>
</style>